package com.mvc.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import com.mvc.domain.mongo.Human;
import com.mvc.service.HumanServiceM;


/**
* @author 李涛
* @version 创建时间：2018年8月30日 下午3:09:04
* 类说明
*/
@RestController
@RequestMapping("/human")
public class HumanController {
	@Autowired
	private HumanServiceM humanService;

	@RequestMapping("/index")
	public ModelAndView index() {
		ModelAndView mav = new ModelAndView("human");
		List<Human> data = humanService.queryList(Criteria.where("name").is("7"), null);
		mav.addObject("data", data);
		return mav;
	}
}

